﻿using Dapper;
using Microsoft.Extensions.Configuration;
using OAProject.Domain.Entities;
using OAProject.Domain.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/// <summary>
/// 请假申请实现类
/// </summary>
namespace OAProject.Infrastructure.Data
{
    public class AttendanceRepository : DapperRepository<Attendance>, IAttendanceRepository
    {
        //依赖注入
        public IConfiguration _configuration;

        public AttendanceRepository(IConfiguration configuration)
        {
            this._configuration = configuration;
            //连接字符串
            this.ConnStr = _configuration.GetConnectionString("ConnStr");
            SimpleCRUD.SetDialect(SimpleCRUD.Dialect.MySQL);
            Conn = new MySql.Data.MySqlClient.MySqlConnection(this.ConnStr);
        }
    }
}
